#include <iostream>
// run: $exec < input
#include <cstdio>
#include <cstring>
#include <vector>
#include <cctype>

struct train { int x, y, l; };
std::vector<train> tr;

int const maxn = 200;

int f[maxn][3][maxn];
bool vis[3][maxn];
char da[3][maxn];
bool train_at_t[maxn][3][maxn];

int T, n, m, px, py;

void get_train(int x, int y)
{
	train tmp;
	tmp.x = x; tmp.y = y; tmp.l = 0;
	for (int i = y; i < n; i++) {
		if (!isupper(da[x][i])) break;
		vis[x][i] = true;
		tmp.l++;
	}
	tr.push_back(tmp);
}

void init()
{
	std::memset(vis, 0, sizeof(vis));
	for (int i = 0; i < 3; i++)
		for (int j = 0; j < n; j++) {
			if (da[i][j] == 's') {
				px = i; py = j;
			} else if (!vis[i][j] && isupper(da[i][j])) {
				get_train(i, j);
			}
		}

}

void animate_train()
{
	std::memset(train_at_t, 0, sizeof(train_at_t));
	for (int ti = 0; ti <= n; ti++) {
		for (auto t : tr) {
			for (int i = 0; i < t.l; i++) {
				int ty = t.y + i - 2 * ti;
				if (ty < 0) continue;
				train_at_t[ti][t.x][ty] = true;
			}
		}
	}
}

bool dp(int x, int y, int time)
{
	if (f[time][x][y]) return f[time][x][y] - 1;
	if (time == n - 1) return true;
	if (train_at_t[time][x][y + 1]) {
		f[time][x][y] = 1;
		return false;
	}
	if (!train_at_t[time + 1][x][y + 1])
		if (dp(x, y + 1, time + 1)) {
			f[time][x][y] = 2;
			return true;
		}
	if (x && !train_at_t[time][x-1][y + 1] && !train_at_t[time + 1][x-1][y+1])
		if (dp(x - 1, y + 1, time + 1)) {
			f[time][x][y] = 2;
			return true;
		}
	if (x < 2 && !train_at_t[time][x+1][y + 1] && !train_at_t[time + 1][x+1][y + 1])
		if (dp(x + 1, y + 1, time + 1)) {
			f[time][x][y] = 2;
			return true;
		}
	f[time][x][y] = 1;
	return false;
}

int main()
{
	std::scanf("%d", &T);
	while (T--) {
		std::scanf("%d %d", &n, &m);
		tr.clear();
		for (int i = 0; i < 3; i++) {
			for (int j = 0; j < n; j++) {
				std::cin >> da[i][j];
			}
		}

		init();
		animate_train();

		std::memset(f, 0, sizeof(f));
		bool ans = dp(px, py, 0);
		if (ans) std::printf("YES\n");
		else	 std::printf("NO\n");
	}
}

